#include "comdef.h"
#include "hif.h"
#include "usb_drv.h"
#include "cmr_drv.h"
#include "sd_drv.h"

#ifndef _TEST_PATTERN_
int test_reset()
#else
int c_main()
#endif
{
	UINT16 temp;
	
	while (1)
	{
		temp=inph(HIF_CMIF_ENTRY);
		temp=inph(HIF_CMIF_ENTRY);
		write_host_internal(HIF_SYS_SW_RST, HIF_RST_CMIF_REG);
		delay(10);
		write_host_internal(HIF_SYS_SW_RST, HIF_RST_CMIF_LOGIC);
		delay(10);
		write_host_internal(HIF_SYS_SW_RST, HIF_RST_SD);
		delay(10);
		write_host_internal(HIF_SYS_SW_RST, HIF_RST_SD_REG);
		delay(10);
		write_host_internal(HIF_SYS_SW_RST, HIF_RST_USB);
		delay(10);
		write_host_internal(HIF_SYS_SW_RST, HIF_RST_AHB);
		delay(10);
		write_host_internal(HIF_SYS_SW_RST, 0);
		delay(10);
	}
}

